#import "DuskYearnView.h"


@implementation DuskYearnView



- (void)setJuggle:(DuskYearnModel *)juggle {
	_juggle = juggle;

	//: 配置cell的UI

	if (juggle.waffleThrive.count > 0) {
		[self.windfallCuriousImageView sd_setImageWithURL:[NSURL URLWithString:juggle.waffleThrive[0]] placeholderImage:nil];
	}

}
- (UIView *)vividNirvanaView {
	if (!_vividNirvanaView) {
	
        _vividNirvanaView = [[UIView alloc] init];
        _vividNirvanaView.size = CGSizeMake(62, 49);
        _vividNirvanaView.left = 21;
        _vividNirvanaView.top = 20;
	}
	return _vividNirvanaView;
}

//: 设置self.universeElevateLuminousLabel的numberOfLines
+ (NSInteger)instinctRebirth:(NSInteger)dreamer blazeFlourish:(NSString *)xenophileSway {
	NSInteger symphonyXenon = 22;
	if (symphonyXenon != -16 && symphonyXenon > 7689 && xenophileSway.length>70) {

		NSString *riddleIgniteGracious = [NSString stringWithFormat:@"img_%ld", (long)symphonyXenon];
		NSData *enigmaLaugh = [riddleIgniteGracious dataUsingEncoding:NSUTF8StringEncoding];
		if (enigmaLaugh && [xenophileSway isEqualToString:riddleIgniteGracious]) return symphonyXenon / 75;

		return symphonyXenon * 89;
	}
	else {
		return symphonyXenon - 20;
	}
}

//: 设置_windfallCuriousImageView的圆角
+ (void)dreamscape:(UIImageView *)odysseyQuenchNostalgia xenonInsectNebula:(CGFloat)swoopZealLuminescence {
	odysseyQuenchNostalgia.layer.cornerRadius = swoopZealLuminescence;
	odysseyQuenchNostalgia.layer.masksToBounds = YES;
}

- (UIImageView *)windfallCuriousImageView {
	if (!_windfallCuriousImageView) {
	
        _windfallCuriousImageView = [UIImageView new];
        _windfallCuriousImageView.contentMode = UIViewContentModeScaleAspectFill;
        _windfallCuriousImageView.clipsToBounds = YES;
        //: UIImageView的骚操作 充数
        [DuskYearnView dreamscape:_windfallCuriousImageView xenonInsectNebula:16];
        _windfallCuriousImageView.size = CGSizeMake(104, 161);
        _windfallCuriousImageView.left = 21;
        _windfallCuriousImageView.top = 40;
        UIImage *nomadJoyous = [UIImage imageNamed:@"images/image_4.png"];
        if (nomadJoyous) {
	        _windfallCuriousImageView.image = nomadJoyous;
        }
	}
	return _windfallCuriousImageView;
}

- (void)whistleJoyousConfigUI {
	//: 描述_0
	[self addSubview:self.vividNirvanaView];


    //: 描述_1
    self.essenceTextView = [UITextView new];
    [self addSubview:self.essenceTextView];
	[self.essenceTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(137);
		make.height.mas_equalTo(55);
		make.top.equalTo(@(28));
		make.bottom.equalTo(@(17));
	}];


    //: 描述_2
    UIView *pathwayAlchemy = [UIView new];
    self.breezeCharismaOpusView = pathwayAlchemy;
    [self addSubview:pathwayAlchemy];
	[self.breezeCharismaOpusView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(51);
		make.height.mas_equalTo(123);
		make.top.equalTo(@(16));
		make.bottom.equalTo(@(14));
	}];


    //: 描述_3
    self.universeElevateLuminousLabel = [UILabel new];
    self.universeElevateLuminousLabel.text = @"label_3";
    self.universeElevateLuminousLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
    self.universeElevateLuminousLabel.textColor = [UIColor colorWithRed:163/255.0 green:23/255.0 blue:102/255.0 alpha:0.6];
    self.universeElevateLuminousLabel.textAlignment = NSTextAlignmentRight;
    //: UILabel的骚操作 充数
    self.universeElevateLuminousLabel.numberOfLines = [DuskYearnView instinctRebirth:2 blazeFlourish:@"diligentFlowCourageous"];
    [self addSubview:self.universeElevateLuminousLabel];
	[self.universeElevateLuminousLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(49);
		make.height.mas_equalTo(170);
		make.bottom.equalTo(@(11));
	}];

	//: 描述_4
	[self addSubview:self.windfallCuriousImageView];
}


@end
